import axios from "axios";
const btn = document.querySelector('#btn')
btn.addEventListener('click', function () {
  axios.get('http://123.57.109.30:3006/api/getbooks').then(({ data: res }) => {
    console.log(res);
  })
})

//引入css
import './css/index.css'

//引入less
import './less/index.less'
//添加图片
import imgObj from './assets/images/1.gif'
const img = document.createElement('img')
img.src = imgObj
document.body.appendChild(img)
//添加字体图标
import './assets/fonts/iconfont.css'
const i = document.createElement('i')
i.className = 'iconfont icon-weixin'
document.body.appendChild(i)

//降级处理
const fn = () => {
  console.log('我是fn');
}
console.log(fn);